package com.quktzhuanka.app.adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.quktzhuanka.app.R;
import com.quktzhuanka.app.bean.SetBean;
import com.quktzhuanka.app.config.Constants;
import com.quktzhuanka.app.widget.CircleImageView;
import com.zhy.adapter.recyclerview.CommonAdapter;
import com.zhy.adapter.recyclerview.base.ViewHolder;

import java.util.List;

public class HomeIconAdapter extends CommonAdapter<SetBean.Item> {
    public HomeIconAdapter(Context context, int layoutId, List<SetBean.Item> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convert(ViewHolder holder, SetBean.Item setBean, int position) {
        //设置图标
        ImageView imageView = holder.getView(R.id.service_icon);
        Glide.with(mContext).load(Constants.APP_IP + setBean.icon).into(imageView);
        //设置名称
        holder.setText(R.id.service_name, setBean.name);
    }
}
